//
//  ViewController.m
//  视频播放
//
//  Created by 廖幸杰 on 2017/3/1.
//  Copyright © 2017年 caichen. All rights reserved.
//

#import "ViewController.h"
#import "ERPlayer.h"

@interface ViewController ()

@property (strong,nonatomic) UIButton *btn;
@property (strong,nonatomic) ERPlayer *player;


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    ERPlayer *player = [ERPlayer new];
    player.frame = CGRectMake(0, 100, 320, 200);

    NSURL *viedoUrl = [NSURL URLWithString:@"http://120.25.226.186:32812/resources/videos/minion_02.mp4"];//[[NSBundle mainBundle] URLForResource:@"Cupid_高清.mp4" withExtension:nil];
    [player setViedoUrl:viedoUrl];
//    player.videoLayerStyle = ERVideoLowerRightCorner;
    [self.view addSubview:player];
    _player = player;
    
    _btn = [[UIButton alloc] initWithFrame:CGRectMake(100, 400, 100, 40)];
    _btn.backgroundColor = [UIColor redColor];
    [_btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:_btn];
    
}

-(void)btnClick:(UIButton*)btn{

    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
